package com.itheima.dao.system;


import com.itheima.domain.system.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserDao {


    //保存
    int save(User user);

    //删除
    int delete(User user);

    //更新
    int update(User user);

    //根据ID查找
    User findById(String id);

    //查询所有
    List<User> findAll();

    void deleteRole(String userId);

    void updateRole(@Param("userId") String userId, @Param("roleId") String roleId);

    User findByEmailAndPwd(@Param("email") String email, @Param("password") String password);

}
